/* 组织架构相关的接口 */

import request from '@/utils/request'
/* 获取部门的接口 */
export const getDepartmentListAPI = () => {
  return request({
    url: '/company/department',
    method: 'GET'
  })
}

/* 新增部门的接口 */
export const addDepartmentAPI = (data) => {
  return request({
    url: '/company/department',
    method: 'POST',
    data
  })
}

/* 删除部门的接口 */
export const deleteDepartmentAPI = (id) => {
  return request({
    url: `/company/department/${id}`,
    method: 'DELETE'
  })
}

/* 修改部门的接口 */
export const updateDepartmentAPI = (id, data) => {
  return request({
    url: `/company/department/${id}`,
    method: 'PUT',
    data
  })
}

/* 查询部门详情的接口 */
export const findDepartmentAPI = (id) => {
  return request({
    url: `/company/department/${id}`,
    method: 'GET'
  })
}

/* 获取部门负责人的接口 */
export const getManagerListAPI = () => {
  return request({
    url: '/sys/user/simple',
    method: 'GET'
  })
}
